|
|
|
BlueCielo TeamWork 2012 Configuration Guide | BlueCielo ECM Solutions |
Cascading value lists are configured by writing a VBScript function for each property that will retrieve only the values related to the value already selected for a different property. The functions are based on the TeamWork GetValues methods, which are further described in the BlueCielo TeamWork VBScript API Reference. The functions are typed as a validation rule for each property.
To configure cascading value lists:
Function GetClients GetClients = Vault.Table ("Clients").GetValues (Null, Null, "Name", True, "Name")
End Function
This function retrieves all values from the Name column of the Clients table.
Function GetClientProjects GetClientProjects = Vault.Table ("Clients").GetValues ("Name", Document.ClientName, "Project", True, "Project")
End Function
This function retrieves only values from the Project column of the Clients table based on the value selected for Document.ClientName at that moment.
Function GetClientProjectContracts GetClientProjectContracts = Vault.Table ("Clients").GetValues (Array ("Name", "Project"), Array (Document.ClientName, Document.ProjectNumber), "Contracts", True, "Contracts")
End Function
This function retrieves only values from the Contracts column of the Clients table based on the value selected for Document.ClientName and Document.ProjectNumber at that moment.
Function GetClientProjectContractContacts GetClientProjectContractContacts = Vault.Table ("Clients").GetValues (Array ("Name", "Project", "Contract"), Array (Document.ClientName, Document.ProjectNumber, Document.ContractNumber), "ContactName", True, "ContactName")
End Function
This function retrieves only values from the ContractName column of the Clients table based on the value selected for Document.ClientName, Document.ProjectNumber, and Document.ContractNumber at that moment.
In all of the preceding example functions, the fourth argument of the GetValues method is True. This is to ensure that the [Distinct] SQL query argument is also True, which ignores duplicate values.
Note When using column names that contain spaces, you must enclose the column name within square brackets, for example: "[Column name with spaces]".
Copyright © 2000-2012 BlueCielo ECM Solutions |